// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "GlobalNotificationWidget.generated.h"

/**
 * 
 */
UCLASS()
class MISCELLANEOUSPROJECT_API UGlobalNotificationWidget : public UUserWidget
{
	GENERATED_BODY()
public:
	virtual void NativeOnInitialized() override;
public:
	UFUNCTION(BlueprintCallable, Category = MissionComponent)
	void DisplayGlobalNotification(float InDisplayTime, FText InHeadline, 
		FText InTopText, bool InSpecialArea, FText InSpecialAreaText,
		bool InGiveXP, int32 InXPValue, FLinearColor InSpecialAreaColor, 
		FLinearColor InHeadlineColor, FLinearColor InXPTextColor);
	FSlateFontInfo MakeOutlineColor(FSlateFontInfo SlateFontInfo, FLinearColor OutlineColor);
private:
	void FirstDelayLater();
	void SecondDelayLater();
public:
	UPROPERTY(meta = (BindWidget))
	class UBorder* CenterBorder;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* Headline;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* TopText;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* SpecialText;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* XPText;
private:
	float DisplayTime;
	FTimerHandle FirstHandle;
	FTimerHandle SecondHandle;
};
